package com.tongji.seller.vo
{
	import flash.display.BitmapData;
	import flash.filters.DropShadowFilter;
	import flash.geom.ColorTransform;

	/**
	 * 
	 * @author ASSASSIN
	 * 2012/02/
	 */
	
	public class FurnitureSaved
	{
		//家具中的图片
		private var _bitfurcontent:BitmapData;
		//家具8个点的信息和位置
		private var _handles:Array;
		//亮度信息
		private var _bright:Number;
		//家具阴影
		private var _filter:DropShadowFilter;
		//属于哪个角度的场景
		private var _comp:int;
		//图片的地址
		public var url:String;
		
		public function FurnitureSaved()
		{
			
		}

		public function get bitfurcontent():BitmapData
		{
			return _bitfurcontent;
		}

		public function set bitfurcontent(value:BitmapData):void
		{
			_bitfurcontent = value;
		}

		public function get handles():Array
		{
			return _handles;
		}

		public function set handles(value:Array):void
		{
			_handles = value;
		}

		public function get bright():Number
		{
			return _bright;
		}

		public function set bright(value:Number):void
		{
			_bright = value;
		}

		public function get filter():DropShadowFilter
		{
			return _filter;
		}

		public function set filter(value:DropShadowFilter):void
		{
			_filter = value;
		}

		public function get comp():int
		{
			return _comp;
		}

		public function set comp(value:int):void
		{
			_comp = value;
		}

		public function saveFurInfo():String
		{
			var arr:Array = new Array();
			for (var i:int = 0; i < _handles.length; i++) 
			{
				arr.push(_handles[i].x, _handles[i].y);
			}
			if (filter == null)
			{
				
				arr.push(0);
				arr.push(0);
				arr.push(0);
				arr.push(-1); //表示该家具无阴影设置
				arr.push(0);
				arr.push(0);
				arr.push(0);
				arr.push(0);
				
			}
			else
			{
				arr.push(_filter.distance);
				arr.push(_filter.angle);
				arr.push(_filter.color);
				arr.push(_filter.alpha);
				arr.push(_filter.blurX);
				arr.push(_filter.blurY);
				arr.push(_filter.strength);
				arr.push(_filter.quality);
			}
			
            arr.push(_bright);
			arr.push(url);
			return arr.toString();
		}




	}
}